
      function whuber(res,first,ruse)
!
! $$$ calls no other routine $$$$$
!
!   Whuber returns the Huber weight for residual res and cutoff ruse.
!   If first is true, a weight of unity is returned.  Programmed on
!   15 May 1985 by R. Buland.
!
      logical first
	  real whuber,res,ruse
      whuber=1.
      if(first) return
      if(abs(res).gt.ruse) whuber=ruse/abs(res)
      return
      end


